# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: GI_Jack <GI_Jack@hackermail.com>

_pyname=minidump
pkgname=python-${_pyname}
pkgver=0.0.21
pkgrel=3
pkgdesc='Python library to parse and read Microsoft minidump file format'
url='https://github.com/skelsec/minidump'
arch=('any')
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
source=("${url}/archive/refs/tags/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('d020e822a90788f787019ed4a1838f96ce9a5eb37388d07f552b2ebb2447ccffaf2446fa0741f85b927a077cefea1f14ac96052b3bd341de15dd46706d25bdb3')
b2sums=('3a957a2b34f0d2c396973fe02b6bb8f0415b9725e5b49643fb4cbcbd63321cc94648f521f75e0a50359baa305a012651ee73551097d0dcc17ec081a8bfafff43')

build() {
  cd ${_pyname}-${pkgver}
  python -m build --wheel --no-isolation
}

package() {
  cd ${_pyname}-${pkgver}
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
